from abchina.util.aes_util import AesCrypter
from abchina.util.api_login import ApiLogin
from abchina.util.launcher import Launcher

if __name__ == '__main__':
    # launcher = Launcher()
    # launcher.launch()
    # if launcher.sec_iv and launcher.sec_key:
    #     sec_key = launcher.sec_key
    #     sec_iv = launcher.sec_iv
    #     cookies = launcher.cookies
    #
    #     aes = AesCrypter(sec_key, sec_iv)
    #     aes.decrypt('DuT95RoWciU/6k5R6zF2RiEUXuG8AJyzYnM48yfHPHGb9H7Nbq8u5SCVpwLOspmyUd1q0qZ8pr6GsCWosgcZRvRdJAnl9Xyc6l7QcKEq6rvMiU0hF0H8l4o8PPcTVA3wKHswi24cxNYGxR7bNIzSow==')

    # result = ApiLogin().get_encrypt_and_cookies()
    # if result and result.get('cookies', {}) and result.get('sec_key', '') and result.get('sec_iv', ''):
    #     cookies = result.get('cookies')
    #     sec_key = result.get('sec_key')
    #     sec_iv = result.get('sec_iv')
    # else:
    #     raise Exception('登录失败')
    # print('init result: %s', result)

    sec_key = 'keTY0sowXDp6741fanBH52gvGNSUQKqu'
    sec_iv = 'ewX7l9uYHTy2zNDb'

    aes = AesCrypter(sec_key, sec_iv)
    de_result = aes.decrypt("jHj1hEG3M4QIH2U6mIZdmUfiz3KBQr4s+8oyKCDBQsveRO+UlinPLkH38FIRGaNkmWq3lC7cn5tszt6DlNGvpOoQfhq+y/T2I2IQeM8Whp5dOEXFqSjni6aKv3iGBXYbJMQWy0pDvzisEHLj9SWgGetD2qvLq9C7rvOC1SfkjtV7DjO4QZpZnHIhQAnfIWJRGXYYZg/vLYbdhg0KN/A4iLr26H1lXCBWHb0yjumpnaslFQh+Nq6zpnqriL9jf5xuzorNp6k9OkpnLjYnOD2uVC62iCUnRgrplDqeV+F7ZUDQi3Gdg3LVJ5N8Po897ZcDzH9BO8eW9IgUIwv/EFGqsWqfkZbhQqJ8MET0TrCUgOPt+6N4dmX4djbJzL7PbwicYXmTub1cH3JEY16Hcpo2a8Kbb3vQlF4LLoP+hVhJmtEAf5SdNBU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